<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="js/jquery-3.1.1.min.js"></script>
<body>

<script type="text/javascript">
    var str="Hello=world!"
    document.write(str.indexOf("=") + "<br/>")
</script>

<script type="text/javascript">
    $(document).ready(function(){
        $(".test li").click(function(){
            alert($(this).index());
        });
    });
</script>
<div class="test">
    <li>Coffee</li>
    <li>Milk</li>
    <li>Soda</li>
</div>
</body>
</html>